

import request from "@/utils/request";

/**
 * 查询店铺类型
 */
export function yxStoreMerchantCategory() {
    return request.get("/yxStoreMerchantCategory", {}, { login: false });
}
/**
 * 商品列表
 */
export function products(data) {
    return request.get("/mer/products",data);
}
/**
 * 商品列表
 */
export function addOrSave(data) {
    return request.post("/yxStoreProduct/addOrSave",data);
}
/**
 * 商家商品列表
 */
export function merProducts(data) {
    return request.get("/mer/manage/products",data);
}
/**
 * 上架下架
 */
export function onsale(id,data) {
    return request.post("/yxStoreProduct/onsale/"+id,data);
}
export function delProduct(id) {
    return request.post("/yxStoreProduct/"+id);
}
/**
 * 获取商品详细
 */
export function info(id) {
    return request.get("/yxStoreProduct/info/"+id);
}
/**
 * 获取商品详细
 */
export function getStores() {
    return request.get("/yxSystemMerchantStore/getStores");
}
/**
 * 抽奖
 */
export function prizedraw() {
    return request.get("/luckyWheel/prizedraw");
}

/**
 * @param {Object} data
 * id: 
 * addressId:
 * 抽奖领取 
 */
export function reward(data) {
    return request.post("/luckyWheel/receive/reward", data);
}
export function getWinningRecords(data) {
    return request.get("/luckyWheel/getWinningRecords", data);
}
/**
 * 查询店铺
 * cateId： 分类id
 * latitude: 
 * longitude
 * page
 * size
 * keyword
 */
export function yxSystemMerchantStore(data) {
    return request.get("/yxSystemMerchantStore", data, { login: false });
}

export function getWinningNotification(data) {
    return request.get("/luckyWheel/getWinningNotification", data);
}


